/*
 * Directory.h
 *
 *  Created on: Jul 9, 2009
 *      Author: oferbart
 */

#ifndef DIRECTORY_H_
#define DIRECTORY_H_

#include <iostream>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <iostream>
#include <string>
#include <iomanip>
#include <fstream>
#include <vector>
#include <sstream>
#include "Utils.h"
#include "MetadataBlock.h"
#include "INode.h"
#include "BlockNode.h"
#include "Utils.h"
#include "Log.h"
#include <math.h>
#include <utility>
using namespace std;

#define ENTRYSIZE 16;

class Directory {
private:
	vector<pair<int,string> >* _entryList;
	int _blockSizeInBytes;
public:
	Directory(int blockSizeInBytes);
	virtual ~Directory();

	unsigned char* toBytes();
	void fromBytes(unsigned char* data);

	vector<pair<int,string> >* getList();
	void setList(vector<pair<int,string> >* list);
	int getNeededBlockCount();


};

#endif /* DIRECTORY_H_ */
